package com.objcat.servicea.entity.dto;

import com.objcat.servicea.entity.vo.UserVo;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * ClassName: UserDto
 * Description:
 * <p>
 * date: 2020/7/27 19:23
 *
 * @author misheep
 * @since JDK 1.8
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class UserDto {
    /**
     * 用户id
     */
    private Long userId;

    /**
     * 用户name
     */
    private String userName;

    /**
     * 用户password
     */
    private String userPassword;

    /**
     * 转换为Vo
     * @return
     */
    public UserVo getUserVo(){
        UserVo userVo = new UserVo();
        userVo.setUserId(this.userId);
        userVo.setUserName(this.userName);
        return userVo;
    }
}
